
#pragma once

#include "../Main.h"
#include "../Preset/ExposedVariable.h"
#include "Controller_ModalDialog.h"
#include "Controller_Screen_Editor.h"

class Widget;
class DialogPanel;
class TextEditor;
class DropdownList;

class Controller_ModalAddWidgetDialog
{
	
	public:
		
		static void Initialise();
		static void Update();
		static void Shutdown();
		
		static void Show();
		static bool IsActive() { return ( s_pxDialogPanel != 0 ); }
		static void SetCallback( void( * pfnCallback )( const Controller_ModalDialogResult ) ) { s_pfnCallback = pfnCallback; }
		
		// Generic 
		static const char*				s_szName;
		static bool						s_bShowLabel;
		static EXPOSED_VARIABLE_TYPE	s_xControlType;
		
		// Slider
		static bool						s_bShowScale;
		static bool						s_bShowMinMaxLabels;
		static float					s_fSliderMin;
		static float					s_fSliderMax;
			
	private:
		
		static void ControlTypeCallback_Number( void* pUserData );
		static void ControlTypeCallback_Slider( void* pUserData );
		static void ControlTypeCallback_Color ( void* pUserData );
		
		static void OKCallback( void* pUserData );
		static void CancelCallback( void* pUserData );
		
		static void Destroy();
		
		static void( * s_pfnCallback )( const Controller_ModalDialogResult );
		
		static DialogPanel* s_pxDialogPanel;
		
		static TextEditor*		s_pxTextEditorName;
		
		static bool s_bDestroy;
};

// eof
